// @import '~@inbiz/components/style/index.less';

@prefix-cls: ~'inbiz-Tinymce';

.@{prefix-cls} {
  &-TinymceBox {
    .tox .tox-statusbar .tox-statusbar__branding {
      display: none;
    }
    .tox.tox-tinymce {
      border: 1px solid #d9d9d9;
      border-radius: var(--inbiz-border-radius-base) !important;
      &:hover {
        border-color: var(--ant-primary-5);
      }
    }

    .tox:not(.tox-tinymce-inline) .tox-editor-header {
      box-shadow: 0 2px 2px -2px rgba(34, 47, 62, 0.1),
        0 4px 8px -4px rgba(34, 47, 62, 0.07);
    }
  }

  &-TinymceBox-disable {
    // cursor: not-allowed;
    pointer-events: none;
    // &:hover{
    //   cursor: no-drop;
    // }
    .tox-tinymce {
      border: 1px solid #d9d9d9;
      border-radius: var(--inbiz-border-radius-base) !important;
    }
    .tox .tox-statusbar {
      border-top: 1px solid #d9d9d9;
    }
    .tox .tox-menubar + .tox-toolbar-overlord .tox-toolbar__primary {
      border-top: 1px solid #d9d9d9;
    }
    .tox .tox-mbtn {
      color: #d9d9d9;
    }

    .tox .tox-tbtn--disabled svg {
      fill: #d9d9d9;
    }

    .tox .tox-tbtn svg {
      fill: #d9d9d9;
    }

    .tox .tox-tbtn {
      color: #d9d9d9;
    }

    .tox:not(.tox-tinymce-inline) .tox-editor-header {
      box-shadow: 0 2px 2px -2px rgba(34, 47, 62, 0.1),
        0 4px 8px -4px rgba(34, 47, 62, 0.07);
    }
  }

  &-TinymceBox-focus {
    .tox.tox-tinymce {
      border: 1px solid var(--inbiz-color-primary);
      box-shadow: 0 0 0 2px var(--ant-primary-color-outline);
    }
  }
}

.tox:not([dir='rtl']):not(.tox-tinymce):hover {
  border-color: var(--ant-primary-1) !important;
  box-shadow: 0 0 0 0.1rem rgba(var(--inbiz-color-primary-toRGB), 0.25) !important;
}
.tox .tox-tbtn:hover {
  background: var(--ant-primary-1) !important;
}

.tox .tox-tbtn--enabled,
.tox .tox-tbtn--enabled:hover {
  background: var(--ant-primary-1) !important;
}

.tox .tox-mbtn--active {
  background: #f5f5f5 !important;
}
.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active) {
  background: #f5f5f5 !important;
}
.tox .tox-mbtn:focus:not(:disabled) {
  background: transparent !important;
}
.tox .tox-button:not(.tox-button--naked) {
  color: var(--inbiz-color-bg) !important;
  background-color: var(--inbiz-color-primary) !important;
  border-color: var(--inbiz-color-primary) !important;
}
.tox .tox-dialog__body-nav-item--active {
  color: var(--inbiz-color-primary) !important;
  border-bottom: 2px solid var(--inbiz-color-primary) !important;
}
.tox .tox-listboxfield .tox-listbox--select:focus,
.tox .tox-textarea:focus,
.tox .tox-textfield:focus {
  border-color: var(--ant-primary-color-hover) !important;
  box-shadow: 0 0 0 2px var(--ant-primary-color-outline) !important;
}
.tox .tox-collection--list .tox-collection__item--active {
  background-color: var(--ant-primary-1) !important;
}
.tox .tox-split-button:hover {
  box-shadow: 0 0 0 1px var(--ant-primary-color-outline) inset !important;
}
.tox .tox-split-button:focus {
  background-color: var(--ant-primary-1) !important;
}
.tox .tox-collection--toolbar .tox-collection__item--active {
  background-color: var(--ant-primary-1) !important;
}
.tox .tox-tbtn:active {
  background: var(--ant-primary-1) !important;
}
.tox .tox-tbtn:focus {
  background: var(--ant-primary-1) !important;
}
.tox .tox-dialog__body-nav-item:focus {
  background-color: var(--ant-primary-1) !important;
}
.tox .tox-dialog__body-nav-item.tox-tab {
  &:focus {
    background-color: transparent !important;
  }
}
.tox
  .tox-collection--grid
  .tox-collection__item--active:not(.tox-collection__item--state-disabled) {
  background-color: var(--ant-primary-1) !important;
}
.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg {
  fill: var(--inbiz-color-primary) !important;
}
.tox input.tox-checkbox__input:focus + .tox-checkbox__icons {
  box-shadow: 0 0 0 1px var(--ant-primary-color-outline) !important;
}
.tox .tox-color-input span:focus:not([aria-disabled='true']),
.tox .tox-color-input span:hover:not([aria-disabled='true']) {
  border-color: var(--ant-primary-color-hover) !important;
}
.tox .tox-insert-table-picker .tox-insert-table-picker__selected {
  background-color: var(--ant-primary-1) !important;
  border-color: var(--ant-primary-color-hover) !important;
}

.tox .tox-edit-area__iframe {
  &::-webkit-scrollbar {
    width: 6px;
  }
}
.tox .tox-edit-area__iframe #document {
  &::-webkit-scrollbar {
    width: 6px;
  }
}
.tox .tox-edit-area__iframe document {
  &::-webkit-scrollbar {
    width: 6px;
  }
}
